<h3 >Lista nenapravljenih porudžbina</h3><br/>


<div class="pull-right">
	<label >Pronađi porudžbinu: &nbsp;</label>
	<input ng-model="search.$" class="form-control">
</div>
<div class="clearfix" style="margin-bottom: 16px;"></div>

<div class="panel panel-default"
ng-repeat='porudzbina in porudzbine | filter:search:strict | orderBy:orderByField:reverseSort'>
    <div class="panel-heading">
        ID: {{porudzbina.porudzbinaID}} <br/>
        Broj stola: {{porudzbina.stoID}}
        <div class="pull-right ">
            <div class="btn-group" ng-controller="PorudzbinaListCtrl" id="parent">
                <a href="" class="btn btn-success" ng-click="porudzbina.napravljena = '1'; napravi(porudzbina);" onclick="window.location.reload()">Napravljeno</a>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="panel-body">
        <table ng-controller="NenapravljenaListCtrl" id="searchObjResults" class='table table-striped'>
            <thead>
                <tr>
                    <th>Artikal</th>
                    <th>Količina</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="stavka in porudzbina.stavke">
                    <td>{{stavka.nazivArtikla}}</td>
                    <td>{{stavka.kolicina}}</td>
                </tr>
            </tbody>
        </table>
        <td>{{porudzbina.nazivArtikla}}</td>
        <td>{{porudzbina.kolicina}}

    </div>
</div>


</div>